<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Account Logs</title>
    <link rel="stylesheet" href="../css/test.css" type="text/css" media="screen"/>
</head>
<body>
<div th:replace="common/top"></div>
<section class="content">
    <main>
        <div class="container">
            <div id="contain">
                <div align="right"><a href="/account/viewAccounts" class="btn-close">return to view Accounts</a></div>
                <div id="mainDiv">
                    <h2 th:text="'Logs of '+ ${accountId}"></h2>
                    <table id="table-1">
                        <tr>
                            <td colspan="3">Browse Logs</td>
                        </tr>
                        <tr th:each="browseLog:${browseLogList}">
                            <td>
                                <span th:text="${browseLog?.id} + '     '"></span>
                            </td>
                            <td>
                                <span th:text="'At ' + ${browseLog?.date} + ', browse item ' + ${browseLog?.action} + '       '"></span>
                            </td>
                            <td>
                                <a th:href="@{/account/deleteBrowseLog(logId=${browseLog?.id})}" class="btn-close">delete</a>
                            </td>
                        </tr>
                    </table>
                    <table id="table-2">
                        <tr>
                            <td colspan="3">Add Logs</td>
                        </tr>
                        <tr th:each="addLog:${addLogList}">
                            <td>
                                <span th:text="${addLog?.id} + '     '"></span>
                            </td>
                            <td>
                                <span th:text="'At ' + ${addLog?.date} + ', put item ' + ${addLog?.action} + 'into cart      '"></span>
                            </td>
                            <td>
                                <a th:href="@{/account/deleteAddLog(logId=${addLog?.id})}" class="btn-close">delete</a>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </main>
</section>
<div th:replace="common/bottom"></div>
</body>
</html>